import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/page/index/index'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/home',
      component: Layout,
      redirect: '/home/index',
      children: [{
        path: 'index',
        name: '主页',
        component: () =>
          import( /* webpackChunkName: "views" */ '@/views/home/index')
      }]
    },
    {
      path: '/',
      name: '主页',
      redirect: '/home'
    },
    {
      path: '/test',
      component: Layout,
      redirect: '/test/index',
      children: [{
        path: 'index',
        name: '内容测试页',
        component: () =>
          import( /* webpackChunkName: "views" */ '@/views/test/index')
      }]
    },
  ]
})
